home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #ifndef _VROOM_H_
- #define _VROOM_H_
-
- #include <X11/Intrinsic.h>
- #include <X11/StringDefs.h>
- #include <Xm/Xm.h>
-
- #define CAR_WIPE_OUT 0x001
- #define CAR_FINISHED 0x002
- #define CHANGE_LANE_LEFT 0x004
- #define CHANGE_LANE_RIGHT 0x008
- #define WIPE_OUT_SPEED 0x010
- #define WIPE_OUT_OFF_ROAD 0x020
- #define WIPE_OUT_COLLISION 0x040
- #define CAR_BUMP 0x080
- #define CAR_SKID 0x100
-
- #define CHANGE_LANES (CHANGE_LANE_LEFT | CHANGE_LANE_RIGHT)
- #define WIPE_OUT_REASON (WIPE_OUT_SPEED | WIPE_OUT_OFF_ROAD | \
- WIPE_OUT_COLLISION)
-
- #define CAR_RACING( c ) (((c)->status & (CAR_WIPE_OUT | CAR_FINISHED)) == 0)
-
- #define VROOM_TRIAL_LAPS 3
-
- #define LANE_WIDTH (75.0f)
- #define RAIL_WIDTH (15.0f)
-
- #define MAX_LOD (4)
-
- #define MAX_PLAYERS (8)
-
- #define MAX_COURSE_NAME 40
- #define MAX_COURSE_SIZE 150
-
- #define TOP_SPEED (1500.0f)
-
- #define MINFUNC(x,y) ( (x) < (y) ? (x) : (y) )
- #define MAXFUNC(x,y) ( (x) > (y) ? (x) : (y) )
- #define ABSFUNC(x) ( (x) < 0 ? -(x) : (x) )
-
- #define MAX_RACE_TIME (99.0f*60.0f+59.99f)
- #define VROOM_NAMELEN (32)
- #define VROOM_MSGLEN (64)
-
- #define VROOM_NO_MODE (0)
- #define VROOM_SOLO (1)
- #define VROOM_TEAM (2)
- #define VROOM_WATCH (3)
-
- #define VROOM_WP_SOLO 0x0001
- #define VROOM_WP_TIME_GRAPHICS 0x0002
- #define VROOM_WP_FIND_SERVER 0x0004
- #define VROOM_WP_RUN_SERVER 0x0008
- #define VROOM_WP_RUN_CLIENT 0x0010
- #define VROOM_WP_READ_SERVER 0x0020
- #define VROOM_WP_SOLO_TRIAL 0x0040
-
- #define INTRO_SFX 0
- #define TONE_SFX 1
- #define START_SFX 2
- #define RESTART_SFX 3
- #define CRASH_SFX 4
- #define ALERT_SFX 5
- #define COLLIDE_SFX 6
- #define CHEERS_SFX 7
- #define LASTLAP_SFX 8
-
- typedef struct {
- int place ;
- float x ;
- float y ;
- float z ;
- float thetaDeg ;
- float roll ;
- float headingDeg ;
- float color[3] ;
- } PlayerStruct ;
-
- /* BEGIN PROTOTYPES vroom.c */
- void aboutCB( Widget w, XtPointer clientData, XtPointer callData ) ;
- Widget addMenuPushButton( Widget parent, char *label, Arg args[], int n,
- XtCallbackProc cb, XtPointer callData ) ;
- void busyCursor( void ) ;
- void controlIntroWindow( int show ) ;
- void controlMainWindow( int show ) ;
- void exitCB( Widget w, XtPointer clientData, XtPointer callData ) ;
- char * extractNormalString( XmString cs ) ;
- void fatalError( char *fmt, ... ) ;
- int getTtl( void ) ;
- void helpCB( Widget w, XtPointer clientData, XtPointer callData ) ;
- char * longRaceTimeString( float t, int *length ) ;
- void main( int argc, char **argv ) ;
- void minorError( XtCallbackProc callback, XtPointer userData,
- char *fmt, ... ) ;
- void * myMalloc( size_t size ) ;
- void * myRealloc( void *ptr, size_t size ) ;
- float normalizeVec2( float v[2] ) ;
- void PopDownCB( Widget callingWidget, Widget doomedWidget,
- caddr_t call_data ) ;
- void popUpCB( Widget w, XtPointer clientData, XtPointer callData ) ;
- void postInfo( XtCallbackProc callback, XtPointer userData, char *fmt,
- ... ) ;
- void printCB( Widget w, XtPointer clientData, XtPointer callData ) ;
- char * raceTimeString( float t, int *length ) ;
- Boolean randomChoice( float threshhold ) ;
- void setAdminForm( Widget newForm ) ;
- void setMessage( char *fmt, ... ) ;
- void setWorkProc( long wpMask, int mode ) ;
- void showRaceHelpCB( Widget w, XtPointer clientData,
- XtPointer callData ) ;
- void startTimeTrials( int skipTrial ) ;
- void unbusyCursor( void ) ;
- /* END PROTOTYPES vroom.c */
-
- #endif /* !_VROOM_H_ */
-